package com.gcxy.controller;


import com.gcxy.service.CityService;
import com.gcxy.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 基础表-省市区 前端控制器
 * </p>
 *
 * @author wlp
 * @since 2023-12-20
 */
@RestController
@RequestMapping("/city")
public class CityController {
    @Autowired
    private CityService cityService;
    private Logger logger= LoggerFactory.getLogger(getClass());
    @ApiOperation("获取1级")
    @PostMapping("province")
    public R getProvince(){
        logger.info("正在查找地址");
        R result=cityService.getProvince();
        return result;
    }
}

